Skip to content

Conversation

rossburton
Copy link

Instead of asking git what the relative path of the current directory is from the root of the repository and then reverse-engineering the root, simply call git rev-parse --show-toplevel.

This option was added in git 1.7.0 back in 2010, so I think it's fair to assume it exists.

Instead of asking git what the relative path of the current directory is
from the root of the repository and then reverse-engineering the root,
simply call git rev-parse --show-toplevel.

This option was added in git 1.7.0 back in 2010, so I think it's fair to
assume it exists.
@rossburton
Copy link
Author

Love it when a test suite works locally but fails in CI.

@RonnyPfannschmidt
Copy link
Contributor

I vaguely recall pain and suffering from windows path normalization

It may be necessary to keep the cutoff of the tailing slashes and to use normalization

@RonnyPfannschmidt
Copy link
Contributor

closing the windows hack is unfortunately necessary

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants